/*
 * @Description:
 * @Date: 2021-09-18 13:54:29
 * @LastEditTime: 2022-02-17 16:07:14
 * @FilePath: /vue3-element-plus/mock/select.ts
 * @Author: Devin
 */
import Mock from 'mockjs';
const Random = Mock.Random;
let select = [
  {
    url: '/mds/select/list',
    type: 'get',
    response: (config: { body: any; }) => {
      let body = config.body;
      let data = Array.from({ length: body.num || 20 }, (_, idx) => ({
        id: Random.id(),
        date: Random.date('yyyy-MM-dd HH:mm:ss'),
        name: Random.cname(),
        email: Random.email(),
        status: Random.boolean()
      }));
      return {
        code: 0,
        data: data
      };
    }
  }
];

export default select;
